﻿#ifndef HOOKTHREAD_H
#define HOOKTHREAD_H

#include <QObject>
#include <QThread>
#include <QDebug>
#include <QTime>
#include <QCoreApplication>
#include <QMutex>
#include <QMouseEvent>

class HookThread : public QThread
{
    Q_OBJECT
public:
    HookThread();
    ~HookThread()
    {}

public:
    void close();
    void pauseThread();
    void resumeThread();

signals:
    void sig_mouseEvent(QMouseEvent* event);

protected:
    void run();

private:
    volatile bool stop;
    bool pause;
    QMutex pauseLock;
    int i;
    int max;

public slots:
    void on_mouseEvent(QMouseEvent* event);
};

#endif // HOOKTHREAD_H
